報修管理API
獲取報修列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| maintenance_id | String | Body | 報修ID |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| description | String | Body | 描述 |
| contact | String | Body | 聯繫人 |
| maintenance_picture_url | []String | Body | 報修圖片地址 |
| feedback | String | Body | 反饋 |
| state | String | Body | 狀態 wait for confirmation:待確認 in progress:進行中 completed:已完成 closed:已關閉 |
| created_time | String | Body | 創建時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_maintenance_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"maintenance_id": "m31adc223cc4b3bedb6bd4742dedcfa52",
"start_time": "2024-01-16 13:32:45",
"finish_time": "2024-01-17 13:32:45",
"description": "test",
"contact": "10086",
"maintenance_picture_url": [
"https://test.akubela.com/p"
],
"feedback": "test",
"state": "in progress",
"created_time": "2024-01-12 13:32:45"
}
]
}
失敗返回示例
見 接口失敗返回
獲取報修信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| maintenance_id | String | Body | 是 | 報修ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| description | String | Body | 描述 |
| contact | String | Body | 聯繫人 |
| maintenance_picture_url | []String | Body | 報修圖片地址 |
| feedback | String | Body | 反饋 |
| state | String | Body | 狀態 wait for confirmation:待確認 in progress:進行中 completed:已完成 closed:已關閉 |
| created_time | String | Body | 創建時間,UTC |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_maintenance_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"maintenance_id": "m31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"start_time": "2024-01-16 13:32:45",
"finish_time": "2024-01-17 13:32:45",
"description": "test",
"contact": "10086",
"maintenance_picture_url": [
"https://test.akubela.com/p"
],
"feedback": "test",
"state": "in progress",
"created_time": "2024-01-12 13:32:45"
}
}
失敗返回示例
見 接口失敗返回
創建報修信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| start_time | String | Body | 是 | 開始時間,UTC |
| finish_time | String | Body | 是 | 結束時間,UTC |
| description | String | Body | 是 | 描述 |
| contact | String | Body | 是 | 聯繫人 |
| filename | []String | Body | 否 | 文件名 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_maintenance_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"start_time": "2024-01-16 13:32:45",
"finish_time": "2024-01-17 13:32:45",
"description": "test",
"contact": "10086",
"filename": [
"f8b5a73f8dd84abaa94dcs248be49b0db"
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"maintenance_id": "m8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失敗返回示例
見 接口失敗返回
刪除報修信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| maintenance_id | String | Body | 是 | 報修ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_maintenance_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"maintenance_id": "m8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
批量刪除報修信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| maintenances | []Object<maintenance> | Body | 是 | 報修信息 |
maintenance說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| maintenance_id | String | Body | 是 | 報修ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_maintenance_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"maintenances": [
{
"maintenance_id": "m8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回